<script>
	import {openDB} from "@/utils/SQLiteRequest.js"
	import {createTablePwd, 
			createTablePerson,
			createTableMain,
			createTableQA,
			createTableHistoryCode,
			createTableClassification,
			createTableClassficationAndMain
			} from "@/API/sqlite/createTable.js"
			
	export default {
		onLaunch: function() {
			openDB();
			setTimeout(()=>{
				createTablePwd().then(res => {
					console.error("index.vue onLoad 创建pwd成功, res is========",res)
				}).catch(err => {
					console.error("index.vue onLoad 创建数据库失败, err is========",err)
				});
				createTablePerson().then(res => {
					console.error("index.vue onLoad 创建person成功, res is========",res)
				}).catch(err =>{
					console.error("index.vue onLoad 创建person失败, res is========",err)
				})
				createTableMain().then(res => {
					console.error("index.vue onLoad 创建Main成功, res is========",res)
				}).catch(err =>{
					console.error("index.vue onLoad 创建Main失败, res is========",err)
				})
				createTableQA().then(res => {
					console.error("index.vue onLoad 创建QA成功, res is========",res)
				}).catch(err =>{
					console.error("index.vue onLoad 创建QA失败, res is========",err)
				})
				createTableHistoryCode().then(res => {
					console.error("index.vue onLoad 创建HistoryCode成功, res is========",res)
				}).catch(err =>{
					console.error("index.vue onLoad 创建HistoryCode失败, res is========",err)
				})
				createTableClassification().then(res => {
					console.error("index.vue onLoad 创建classification成功, res is========",res)
				}).catch(err =>{
					console.error("index.vue onLoad 创建classification失败, res is========",err)
				})
				createTableClassficationAndMain().then(res =>{console.error("index.vue onLoad 创建关联表成功,")}).catch(err=>{console.error("创建关联表失败，原因是  ",err)})
			},100)
			console.log('App Launch')
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style>
	/*每个页面公共css */
</style>
